You are here: System Administration > Queries

Queries

Queries are one of the key tools of data filtering. While Concept Evolution has quick search and column specific filtering on grids; queries allow a User to narrow data in other ways e.g. Show all those tasks that are still active or assigned or all non-urgent calls logged today.

Queries can be written by a User for their use only- create the Query in Settings > User Preferences > Queries, or they can be written within System Administration and be made available to all Concept Evolution Users.

The list of System Queries are maintained here.

System Administration > System Preferences > Queries

The link will open the Query grid. It is a grid view which can be searched, sorted and customised as normal.

To add a new Query click New , to edit an existing Query click Edit . A pop up window will appear which will allow the creation or amendment of a Query.

ClosedClick to view - Query Fields and Descriptions

Field Name Description
Name The name of the Query.
Entity Type From the drop down select the entity type the query is to be written around.
Entity Click on the added entity to add fields and operators to the Query.
Field From the drop down select the required field – select add to add the field to the Query.
Relationship From the drop down select a related table to add to the Query – select add to add the filed to the query.
Operator Add groups to ensure the database is grouping information for calculations correctly.

Complete the Query and click Save and Close .

Query Functions

The below functions can be used in system queries

{DateNow} Returns the current date.
{Null} Allows matching nulls.
{Me} Returns current logged Account ID.
{Last N Days} Returns the last N days up to the end of yesterday.
{Next N Days} Returns the next N end days from the beginning of today.
{Today} Returns between <system date> 00:00 and <system date> 23:59.
{Now} Returns current date and time.
{My Contact}

Available from 4.8.0.0

KP_SEQ of FADDRS linked to current Account

{My Contact Building}

Available from 4.8.0.0

KP_FKEY_BG_SEQ of FADDRS linked to current Account

{My Contact Supplier}

Available from 4.8.0.0

KP_FKEY_SUP_SEQ of FADDRS linked to current Account

{My Contact Class}

Available from 4.8.0.0

KP_FKEY_CON_CLASS_SEQ of FADDRS linked to current Account

{My Contact Working Department}

Available from 4.8.0.0

KP_FKEY_DP_SEQ of FADDRS linked to current Account

{My Contact Belongs To Department}

Available from 4.8.0.0

KP_SEC_FKEY_DP_SEQ of FADDRS linked to current Account

{My Published Suppliers}

Available from 4.8.0.0

SUP_SEQs published to the current Account

You can also use the form {Now+N}, {Now-N}, {DateNow+N} or {DateNow-N} where N is the number of Days.